package com.lrkj.payfee.service.impl;

import com.lrkj.payfee.domain.ReceiptRecord;
import com.lrkj.payfee.domain.vo.ReceiptRecordVo;
import com.lrkj.payfee.mapper.ReceiptRecordMapper;
import com.lrkj.payfee.service.IReceiptRecordService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 收款单明细记录Service业务层处理
 *
 * @author yajun_ren
 * @date 2021-08-16
 */
@Service
public class ReceiptRecordServiceImpl implements IReceiptRecordService {
    @Autowired
    private ReceiptRecordMapper receiptRecordMapper;

    /**
     * 查询收款单明细记录
     *
     * @param receiptRecordId 收款单明细记录ID
     * @return 收款单明细记录
     */
    @Override
    public ReceiptRecord selectReceiptRecordById(String receiptRecordId) {
        return receiptRecordMapper.selectReceiptRecordById(receiptRecordId);
    }

    /**
     * 查询收款单明细记录列表
     *
     * @param receiptRecord 收款单明细记录
     * @return 收款单明细记录
     */
    @Override
    public List<ReceiptRecord> selectReceiptRecordList(ReceiptRecord receiptRecord) {
        return receiptRecordMapper.selectReceiptRecordList(receiptRecord);
    }

    @Override
    public List<ReceiptRecordVo> selectRecordRuleCostList(ReceiptRecord receiptRecord) {
        return receiptRecordMapper.selectRecordRuleCostList(receiptRecord);
    }

    /**
     * 新增收款单明细记录
     *
     * @param receiptRecord 收款单明细记录
     * @return 结果
     */
    @Override
    public int insertReceiptRecord(ReceiptRecord receiptRecord) {
        return receiptRecordMapper.insertReceiptRecord(receiptRecord);
    }

    /**
     * 修改收款单明细记录
     *
     * @param receiptRecord 收款单明细记录
     * @return 结果
     */
    @Override
    public int updateReceiptRecord(ReceiptRecord receiptRecord) {
        return receiptRecordMapper.updateReceiptRecord(receiptRecord);
    }

    /**
     * 批量删除收款单明细记录
     *
     * @param receiptRecordIds 需要删除的收款单明细记录ID
     * @return 结果
     */
    @Override
    public int deleteReceiptRecordByIds(String[] receiptRecordIds) {
        return receiptRecordMapper.deleteReceiptRecordByIds(receiptRecordIds);
    }

    /**
     * 删除收款单明细记录信息
     *
     * @param receiptRecordId 收款单明细记录ID
     * @return 结果
     */
    @Override
    public int deleteReceiptRecordById(String receiptRecordId) {
        return receiptRecordMapper.deleteReceiptRecordById(receiptRecordId);
    }

    @Override
    public int doSaveList(List<ReceiptRecord> saveBeans) {
        return receiptRecordMapper.doSaveList(saveBeans);
    }

    @Override
    public int deleteRecordByReceiptIds(String[] receiptIds) {
        return receiptRecordMapper.deleteRecordByReceiptIds(receiptIds);
    }
}
